package com.heima.user.feign;

import com.heima.apis.apuser.IUserClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author lzq
 * @data 2023/5/16 18:53
 */
@RestController
public class UserClient implements IUserClient {
    @Autowired
    private ApUserService apUserService;
    @Override
    @PostMapping("/api/v1/get")
    public ResponseResult getUser(@RequestParam("id") Integer id) {
        ApUser apUser = apUserService.getById(id);
        return ResponseResult.okResult(apUser);
    }
}
